<style lang='scss' type='stylesheet/scss' scoped>
.as-button {
  margin-bottom: 10px;
}
</style>
<template>
  <div>
    <as-h2>dateType</as-h2>
    <as-card :text="text"
             :disabled="isMobile"
             title="为 as-date-pick 绑定 dateType 后可以显示不同的日期格式，可选值为 year 年 / month 月 / day 日，默认值为 day">
      <as-date-pick v-model="date"
                    dateType="year"
                    placeholder="请选择年"></as-date-pick>
      <as-date-pick v-model="dateMonth"
                    dateType="month"
                    placeholder="请选择月"></as-date-pick>
    </as-card>
  </div>
</template>

<script type="text/ecmascript-6">
import { mapGetters } from "vuex";
export default {
  name: "",
  computed: {
    ...mapGetters(["isMobile"])
  },
  data() {
    return {
      date: "",
      dateMonth: "",
      text: `<template>
   <div>
     <as-date-pick v-model="date" dateType="year" placeholder="请选择年"></as-date-pick>
     <as-date-pick v-model="dateMonth" dateType="month" placeholder="请选择月"></as-date-pick>
   </div>
 </template>
 <script>
 export default {
   data() {
     return {
       date: "",
       dateMonth: "",
     }
   }
 }
 <\/script>`
    };
  }
};
</script>
